﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DevExpress.Xpo;
namespace ChuanPlus
{
    public class Distributor : XPLiteObject
    {
        int fDistributorID;
        [Key(true)]
        public int DistributorID
        {
            get { return fDistributorID; }
            set { SetPropertyValue<int>("DistributorID", ref fDistributorID, value); }
        }
        string fDistributorName;
        [Size(255)]
        public string DistributorName
        {
            get { return fDistributorName; }
            set { SetPropertyValue<string>("DistributorName", ref fDistributorName, value); }
        }
        public Distributor(Session session) : base(session) { }
        public Distributor() : base(Session.DefaultSession) { }
        public override void AfterConstruction() { base.AfterConstruction(); }
        /// <summary>
        /// Initializes a new instance of the Distributor class.
        /// </summary>
        /// <param name="fDistributorName"></param>
        public Distributor(string fDistributorName)
        {
            this.fDistributorName = fDistributorName;
        }
        /// <summary>
        /// Initializes a new instance of the Distributor class.
        /// </summary>
        /// <param name="fDistributorName"></param>
        public Distributor(Session s,string fDistributorName):base(s)
        {
            this.fDistributorName = fDistributorName;
        }
        public override string ToString()
        {
            return DistributorName;
        }
    }
}
